package com.techfort.metalrss.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

public class FavouritesHelper extends SQLiteOpenHelper {

	private static final String DATABASE = "metalrss";
	private static int DATABASE_VERSION = 2;
	private static final String TABLE = "feeds";
	private static final String CREATE = 
		"create table " + TABLE + " (id integer primary key, feed_name text, lang_id text, link text);";
	
	public FavouritesHelper(Context context) {
		super(context, DATABASE, null, DATABASE_VERSION);
		
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(CREATE);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {
		db.execSQL("DROP TABLE if exists " + TABLE);
		onCreate(db);
	}

}
